<template>
	<view class="content">
		<view class="introduce">
			商品介绍
		</view>
		<view class="intro-box" >
			<view v-html="dataArr.goodsDetails"></view>
			<!-- <view>{{dataArr.goodsIntro}}</view>
			<view >
				<image :src="'../../../static/Mall/'+dataArr.goodsImg" mode="" class="tp"></image>
			</view> -->
		</view>
	</view>
</template>

<script>
	import {

		reactive
	} from 'vue';
	import {
		onLoad
	} from '@dcloudio/uni-app';
	import myRequest from '../../../utils/myRequest.js';
	export default {
		setup() {
			let data = reactive({
				goodsId: "",
				dataArr: [],
				CommodityInformation: function(i) {
					myRequest({
						url:"/getgoodsId",
						method: 'POST',
						data: {
							id: i
						},
					}).then((res)=>{
						if (res.data.code == 200) {
						
							data.dataArr = res.data.data[0]
						
						
						}
					})
					
				},
			})
			onLoad((option)=>{
				data.goodsId=option.id;
				data.CommodityInformation(option.id)
			})
			return data;



		}



	}
</script>

<style  lang="scss">
	.text_img {
		max-width: 690rpx;
		display: block;
		margin: 20rpx auto;
	}
	.content {
		margin-bottom: 50px;
	}

	.intro-box {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-bottom: 40rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
	}

	.intro-box view {
		font-size: 26rpx;
		margin-bottom: 20rpx;
	}

	.intro-box view image {
		text-align: center;
	}

	.introduce {
		font-weight: bold;
		height: 100rpx;
		line-height: 100rpx;
		padding-left: 25rpx;
	}

	.tp {

		width: 375rpx;
		height: 300rpx;
	}

	// .intro-boxTwo image {
	// 	text-align: center;
	// }
</style>
